<?php

namespace app\exception;

use support\exception\BusinessException;
use Webman\Http\Request;
use Webman\Http\Response;

class HttpResponseException extends BusinessException
{
    /**
     * @var Response
     */
    protected $response;

    public function __construct(Response $response)
    {
        parent::__construct();
        $this->response = $response;
    }

    public function render(Request $request): ?Response
    {
        return $this->response;
    }
}